package com.xiaoshuidi.cloud.module.rooms.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.rooms.controller.admin.area.vo.RoomProvinceCityVO;
import com.xiaoshuidi.cloud.module.rooms.pojo.RoomProvinceCity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author sampson
 * create 2023/12/24
 * email  sampson.wang@ixiaoshuidi.com
 */
@Mapper
public interface RoomProvinceCityMapper extends BaseMapperX<RoomProvinceCity> {

    @Select("select distinct ${column},${column1} from room_province_city where ${ew.sqlSegment}")
    List<RoomProvinceCityVO> distinct(@Param("ew") LambdaQueryWrapper<?> wrapper, @Param("column") String column,@Param("column1") String column1);

    @Select("select ${column} from room_province_city where ${ew.sqlSegment}")
    List<RoomProvinceCityVO> get(@Param("ew") LambdaQueryWrapper<?> wrapper,@Param("column") String column);
}
